
//
//  ZMyLotteryController.m
//  Zlottery
//
//  Created by HuaYingJiTuan on 16/1/11.
//  Copyright © 2016年 张庆庆. All rights reserved.
//

#import "ZMyLotteryController.h"
#import "ZSettingController.h"
#import "UIImage+Ex.h"
#import "ZHelpController.h"
@interface ZMyLotteryController ()

@property (weak, nonatomic) IBOutlet UIBarButtonItem *settingBtn;
@property (weak, nonatomic) IBOutlet UIButton *loginBtn;
@end

@implementation ZMyLotteryController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    //设置按钮中的背景图片。拉伸不变形
    UIImage *backImg = [UIImage imageNamed:@"RedButton"];
    backImg = [backImg stretchableImageWithLeftCapWidth:backImg.size.width * 0.5 topCapHeight:backImg.size.height * 0.5];
    [self.loginBtn setBackgroundImage:backImg forState:UIControlStateNormal];
    self.settingBtn.image = [UIImage originalImge:@"Mylottery_config"];
}
- (IBAction)settingItemClick:(id)sender {
    //跳转到setting控制器
    ZSettingController *vc = [ZSettingController new];
    vc.title = @"设置";
    vc.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"常见问题" style:UIBarButtonItemStylePlain target:self action:@selector(clickHelp)];
    [self.navigationController pushViewController:vc animated:YES];
}
- (void)clickHelp{
    ZHelpController *hVC = [[ZHelpController alloc]init];
    [self.navigationController pushViewController:hVC animated:YES];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}



@end
